

package com.hazelcast.internal.config;

import com.hazelcast.config.DurableExecutorConfig;

import javax.annotation.Nullable;

public class DurableExecutorConfigReadOnly extends DurableExecutorConfig {

    public DurableExecutorConfigReadOnly(DurableExecutorConfig config) {
        super(config);
    }

    @Override
    public DurableExecutorConfig setName(String name) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setPoolSize(int poolSize) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setCapacity(int capacity) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setDurability(int durability) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setSplitBrainProtectionName(String splitBrainProtectionName) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setStatisticsEnabled(boolean statisticsEnabled) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }

    @Override
    public DurableExecutorConfig setUserCodeNamespace(@Nullable String userCodeNamespace) {
        throw new UnsupportedOperationException("This config is read-only durable executor: " + getName());
    }
}
